package Sqlfuncation;

import org.apache.ibatis.session.SqlSession;

import POJO.Product;
import util.MybatisSession;

public class AllFuncation {

	public static SqlSession getSession(){
		SqlSession session = MybatisSession.openSession();
		return session;
	}
	
	public static Product selectById(int id){
		String statement = "mapper.productMapper.selectById";
		Product p = getSession().selectOne(statement,id);
		return p;
	}
}
